import lejos.nxt.*;
import lejos.robotics.subsumption.Arbitrator;
import lejos.robotics.subsumption.Behavior;

public class billbrains {
	/**
	 * Function to start program with. Initializes BillManager.
	 * @param args Unused
	 * @see BillManager
	 */
	public static void main(String[] args) {
		// debug will write information to the bluetooth connection
		boolean useDebug = true;
		
		BillManager.Initialize(SensorPort.S3, SensorPort.S2, SensorPort.S1,	SensorPort.S4, useDebug);
		System.out.println("Starting..");

		Behavior[] bArray = {
				new MoveForward(),
				new FindBallAndMoveToward(),
				new FaceGoal(),
				new Shoot(),
				new StayInField(),
				new Avoid(),
				new Exit(), // exit, should be highest priority
		};

		Arbitrator arb = new Arbitrator(bArray, true);
		arb.start();
	}
}
